package com.changan.mapper;

import com.changan.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    /**
     * 根据用户的账号查询用户的信息
     * @param userCode
     * @return
     */
    User loadUserByUserCode(String userCode);

    List<User> getUsers(@Param("userName") String userName,
                        @Param("userRole") Integer userRole);
}